home *** CD-ROM | disk | FTP | other *** search
Wrap
# Source Generated with Decompyle++ # File: in.pyc (Python 2.4) import sys import commands import string import os import popen2 import fcntl import fcntl import select from os.path import isfile import shutil import fileinput import re import main import objects atimanlatest = '8.33.6' atimanlegacy = '8.28.8' nvmanlatest = '9746' nvmannewlegacy = '9631' nvmanlegacy = '7184' class Compatibcheck: def check(self): a = main.getCommandOutput('lspci | grep "VGA"') b = a.lower().split(' ') c = self.brandname.lower() if c not in b: print 'ENVY ERROR: ' + self.brandname + ' card not found' event = 'error' else: event = 'passed' return event class Specsdetect: def init(self): self.details = { } def codename(self): ''' Get system codename, can be warty/hoary/breezy/dapper/edgy/etch ''' p = os.popen('lsb_release -c') try: codename = p.readline().strip() tokens = codename.split('\t') finally: p.close() self.details['osname'] = tokens[-1].lower() def architecture(self): ''' Detect whether the architecture is x86/ppc/amd64 ''' arch = os.uname()[-1] if arch in ('ppc', 'ppc64'): arch = 'powerpc' elif arch == 'x86_64': arch = 'x86_64' elif arch in ('i386', 'i686', 'i586', 'k7'): arch = 'x86' self.details['arch'] = arch def systemcheck(self): if self.details['osname'] == 'dapper': if self.details['arch'] == 'x86': print 'Ubuntu Dapper 32bit' elif self.details['arch'] == 'x86_64': print 'Ubuntu Dapper 64bit' else: print 'Your architecture is not supported by Envy' sys.exit() elif self.details['osname'] == 'edgy': if self.details['arch'] == 'x86': print 'Ubuntu Edgy 32bit' elif self.details['arch'] == 'x86_64': print 'Ubuntu Edgy 64bit' else: print 'ENVY ERROR: Your architecture is not supported by Envy' sys.exit() elif self.details['osname'] == 'feisty': if self.details['arch'] == 'x86': print 'Ubuntu Feisty 32bit' elif self.details['arch'] == 'x86_64': print 'Ubuntu Feisty 64bit' else: print 'ENVY ERROR: Your architecture is not supported by Envy' sys.exit() else: print 'ENVY ERROR: Your Operative System does not seem to be supported by Envy' sys.exit() def drivertype(self): availabledrv = [] syscards = main.getCommandOutput('lspci -n | grep "0300" | cut -d " " -f3 | sed s/.*://').strip().lower() systemcards = syscards.split('\n') for element in systemcards: try: systemcards.remove('\n') continue except ValueError: continue for card in systemcards: if self.cards.setdefault(card, 'N/A') != 'N/A': print 'Your graphic card has been detected as a ' + self.cards[card] print 'Your graphic card is supported by the latest driver' drvtype = 'latest' elif self.middlecards.setdefault(card, 'N/A') != 'N/A': print 'Your graphic card has been detected as a ' + self.middlecards[card] print 'Your graphic card is supported by the new legacy driver' drvtype = 'middle' elif self.legacycards.setdefault(card, 'N/A') != 'N/A': print 'Your graphic card has been detected as a ' + self.legacycards[card] print 'Your graphic card is supported by the legacy Driver' drvtype = 'oldest' else: drvtype = 'unsupported' availabledrv.append(drvtype) if 'latest' in availabledrv: self.details['drvtype'] = 'latest' elif 'middle' in availabledrv: self.details['drvtype'] = 'middle' elif 'oldest' in availabledrv: self.details['drvtype'] = 'oldest' else: print "ENVY ERROR: Envy does not recognise your card as compatible with any version of the driver. this might happen because either your card is not supported by the driver or Envy's hardware detection failed. You can try the manual installation at your risk." sys.exit() def driverpushback(self): availabledrv = [] systemcards = [] p = os.popen('lspci -n') indentifier1 = re.compile('.*0300:.*:(.+) \\(.+\\)\n') indentifier2 = re.compile('.*0300:.*:(.+)\n') for line in p: m1 = indentifier1.match(line) m2 = indentifier2.match(line) if m1: id = m1.group(1).strip().lower() systemcards.append(id) continue if m2: id = m2.group(1).strip().lower() systemcards.append(id) continue for card in systemcards: if self.cards.setdefault(card, 'N/A') != 'N/A': drvtype = 'latest' elif self.middlecards.setdefault(card, 'N/A') != 'N/A': drvtype = 'middle' elif self.legacycards.setdefault(card, 'N/A') != 'N/A': drvtype = 'oldest' else: drvtype = 'unsupported' availabledrv.append(drvtype) if 'latest' in availabledrv: self.details['drvtype'] = 'latest' elif 'middle' in availabledrv: self.details['drvtype'] = 'middle' elif 'oldest' in availabledrv: self.details['drvtype'] = 'oldest' def atimanver(self): while None: drvchoice = raw_input('\n Select the version of the driver which would you like to install:\n 1 - ' + atimanlatest + ' (latest)\n 2 - ' + atimanlegacy + ' (legacy)\n 3 - Back to main menu\n (Type 1, 2 or 3)\n').strip() if drvchoice == '1': self.details['drvtype'] = 'latest' self.details['manualchoice2'] = 'notmenu' break continue if drvchoice == '2': self.details['drvtype'] = 'oldest' self.details['manualchoice2'] = 'notmenu' break continue if drvchoice == '3': self.details['drvtype'] = 'oldest' self.details['manualchoice2'] = 'menu' break continue if self.details['manualchoice2'] == 'menu': objects.mainmenu() else: self.atireleasenum() def nvidiamanver(self): while None: drvchoice = raw_input('\n Select the version of the driver which would you like to install:\n 1 - ' + nvmanlatest + ' (latest)\n 2 - ' + nvmannewlegacy + ' (new legacy)\n 3 - ' + nvmanlegacy + ' (legacy)\n 4 - Back to main menu\n (Type 1, 2, 3 or 4)\n').strip() if drvchoice == '1': self.details['drvtype'] = 'latest' self.details['manualchoice1'] = 'notmenu' break continue if drvchoice == '2': self.details['drvtype'] = 'middle' self.details['manualchoice1'] = 'notmenu' break continue if drvchoice == '3': self.details['drvtype'] = 'oldest' self.details['manualchoice1'] = 'notmenu' break continue if drvchoice == '4': self.details['manualchoice1'] = 'menu' break continue if self.details['manualchoice1'] == 'menu': objects.mainmenu() else: self.nvreleasenum() def manualdetails(self): while None: drvchoice = raw_input('\n Select the kind of driver which would you like to install:\n 1 - ATI\n 2 - NVIDIA\n 3 - Back to main menu\n (Type either 1 or 2)\n').strip() if drvchoice == '1': self.details['cardbrand'] = 'ati' self.details['manualchoice'] = 'notmenu' break continue if drvchoice == '2': self.details['cardbrand'] = 'nvidia' self.details['manualchoice'] = 'notmenu' break continue if drvchoice == '3': self.details['manualchoice'] = 'menu' break continue if self.details['manualchoice'] == 'menu': objects.mainmenu() elif self.details['cardbrand'] == 'ati': self.atimanver() elif self.details['cardbrand'] == 'nvidia': self.nvidiamanver() def nvreleasenum(self): if self.details['drvtype'] == 'latest': version = '1.0-' + nvmanlatest elif self.details['drvtype'] == 'middle': version = '1.0-' + nvmannewlegacy elif self.details['drvtype'] == 'oldest': version = '1.0-' + nvmanlegacy self.details['ver'] = version def atireleasenum(self): if self.details['drvtype'] == 'latest': version = atimanlatest elif self.details['drvtype'] == 'middle': version = 'none' elif self.details['drvtype'] == 'oldest': version = atimanlegacy self.details['ver'] = version def strippedver(self): complete = self.details['ver'] stripped = complete.split('1.0-') stripped.remove('') self.details['strippedver'] = stripped[0] next = int(stripped[0]) + 1 self.details['nextver'] = '1.0.' + str(next) def changelog(self): lines = [] file1 = '/usr/share/envy/nvidia-graphics-drivers/debian/changelog' release = '1.0.' + self.details['strippedver'] opsystem = self.details['osname'] pat1 = re.compile('nvidia-graphics-drivers (\\(.+\\)) (.+); urgency=low') text = open(file1, 'r') optext = text.readlines() for line in optext: m1 = pat1.match(line) if m1: line = 'nvidia-graphics-drivers (' + release + ') ' + opsystem + '; urgency=low\n' lines.append(line) continue lines.append(line) text.close() sep = '' modtext = open(file1, 'w') a = sep.join(lines) modtext.write(a) modtext.close() def upstream(self): lines = [] file1 = '/usr/share/envy/nvidia-graphics-drivers/debian/upstream_info' release = self.details['strippedver'] next = self.details['nextver'] pat1 = re.compile('RELEASE=.+(.*)') pat2 = re.compile('NEXTVER=.+(.*)') text = open(file1, 'r') optext = text.readlines() for line in optext: m1 = pat1.match(line) m2 = pat2.match(line) if m1: line = 'RELEASE=' + release + '\n' lines.append(line) continue if m2: line = 'NEXTVER=' + next + '\n' lines.append(line) continue lines.append(line) text.close() sep = '' modtext = open(file1, 'w') a = sep.join(lines) modtext.write(a) modtext.close() def nvidiapkgmake(self): os.system('sudo chmod +x /usr/share/envy/nvidia-graphics-drivers/*.run') os.system('cd /usr/share/envy/nvidia-graphics-drivers/ && sudo dpkg-buildpackage -b -uc') def nvpkginstall(self): drvname = self.details['drvname'] os.system('cd /usr/share/envy/ && sudo dpkg -i *.deb') os.system('sudo apt-get install -f -y') def nvrmdeb(self): os.system('sudo rm /usr/src/nvidia-kernel*.deb') def nvkmod(self): os.system('sudo module-assistant prepare') os.system('sudo module-assistant update') os.system('sudo module-assistant build nvidia') os.system('sudo module-assistant install nvidia') os.system('sudo depmod -a') def buildclean(self): os.system('sudo rm /usr/share/envy/*.deb') os.system('sudo rm /usr/share/envy/*.asc') os.system('sudo rm /usr/share/envy/*.changes') os.system('sudo rm /usr/share/envy/nvidia-graphics-drivers/*stamp') os.system('sudo rm -R /usr/share/envy/nvidia-graphics-drivers/NVIDIA-Linux-' + self.details['arch'] + '-' + self.details['ver'] + '-' + self.details['pkg']) os.system('sudo rm /usr/share/envy/nvidia-graphics-drivers/*.tar.gz') os.system('sudo rm /usr/share/envy/nvidia-graphics-drivers/debian/files') os.system('sudo rm /usr/share/envy/nvidia-graphics-drivers/debian/nvidia-glx.postinst.debhelper') os.system('sudo rm /usr/share/envy/nvidia-graphics-drivers/debian/nvidia-glx.postrm.debhelper') os.system('sudo rm /usr/share/envy/nvidia-graphics-drivers/debian/nvidia-glx.prerm.debhelper') os.system('sudo rm /usr/share/envy/nvidia-graphics-drivers/debian/nvidia-glx.substvars') os.system('sudo rm /usr/share/envy/nvidia-graphics-drivers/debian/nvidia-glx.substvars.bak') os.system('sudo rm -R /usr/share/envy/nvidia-graphics-drivers/debian/nvidia-glx') os.system('sudo rm -R /usr/share/envy/nvidia-graphics-drivers/debian/nvidia-glx-dev') os.system('sudo rm -R /usr/share/envy/nvidia-graphics-drivers/debian/nvidia-kernel-source') os.system('sudo rm -R /usr/share/envy/nvidia-graphics-drivers/debian/nvidia-glx-ia32') def nvpkg(self): if self.details['arch'] == 'x86': pkg = 'pkg0' elif self.details['arch'] == 'x86_64': pkg = 'pkg2' self.details['pkg'] = pkg def nvvarsum(self): if self.details['arch'] == 'x86': if self.details['drvtype'] == 'latest': md5old = '575f988468f2c34a302da3d21e282689' elif self.details['drvtype'] == 'middle': md5old = 'b0d721c962c4df1a028ae18416d7e862' else: md5old = '149e5e9934387da5da6ebe21d694e82a' elif self.details['arch'] == 'x86_64': if self.details['drvtype'] == 'latest': md5old = 'c0afc66e1c21a9a54ba6719b8edd3166' elif self.details['drvtype'] == 'middle': md5old = '64b88c6f405e7f2dd1607c0062c0c1f3' else: md5old = '332850387c4e7a4619753b856e3199e5' self.details['md5old'] = md5old def ativarsum(self): if self.details['arch'] == 'x86': if self.details['drvtype'] == 'latest': md5old = '5fbd42d666d467a904acbaeb600c1d5a' elif self.details['drvtype'] == 'middle': md5old = 'none' else: md5old = '58189d7cc3625e399b1a434df893100f' elif self.details['arch'] == 'x86_64': if self.details['drvtype'] == 'latest': md5old = '5fbd42d666d467a904acbaeb600c1d5a' elif self.details['drvtype'] == 'middle': md5old = 'none' else: md5old = '58189d7cc3625e399b1a434df893100f' self.details['md5old'] = md5old def nvpkgname(self): driver = 'NVIDIA-Linux-' + self.details['arch'] + '-' + self.details['ver'] + '-' + self.details['pkg'] + '.run' self.details['drvname'] = driver def atipkgname(self): if self.details['drvtype'] == 'oldest': driver = 'ati-driver-installer-' + self.details['ver'] + '.run' else: driver = 'ati-driver-installer-' + self.details['ver'] + '-x86.x86_64.run' self.details['drvname'] = driver def nvftpfolder(self): nvidiaftp = 'Linux-' + self.details['arch'] + '/' + self.details['ver'] self.details['nvftpdir'] = nvidiaftp def nvaddress(self): if self.details['drvtype'] == 'oldest': wsite = ' http://download.nvidia.com/XFree86/' else: wsite = ' http://us.download.nvidia.com/XFree86/' nvweb = wsite + self.details['nvftpdir'] + '/' + self.details['drvname'] self.details['website'] = nvweb def atiaddress(self): if self.details['drvtype'] == 'oldest' and self.details['arch'] == 'x86_64': atiweb = ' https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/64bit/' + self.details['drvname'] else: atiweb = ' https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/' + self.details['drvname'] self.details['website'] = atiweb def getdriver(self): if self.details['cardbrand'] == 'nvidia': driverlocation = os.path.isfile('/usr/share/envy/nvidia-graphics-drivers/' + self.details['drvname']) else: driverlocation = os.path.isfile(self.details['drvname']) if driverlocation: print 'An installer has been detected' if self.details['cardbrand'] == 'nvidia': md5new1 = main.getCommandOutput('md5sum /usr/share/envy/nvidia-graphics-drivers/' + self.details['drvname'] + ' | cut -d " " -f1') else: md5new1 = main.getCommandOutput('md5sum ' + self.details['drvname'] + ' | cut -d " " -f1') md5new = md5new1.strip() print 'md5new: ' + md5new print 'md5sumold: ' + self.details['md5old'] if md5new != self.details['md5old']: print 'ENVY ERROR: md5 Error! Trying to fetch the driver from the website' if self.details['cardbrand'] == 'nvidia': os.remove('/usr/share/envy/nvidia-graphics-drivers/' + self.details['drvname']) else: os.remove('/usr/share/envy/' + self.details['drvname']) self.getdriver() else: print 'No installer detected' print 'Download of the driver in progress, please wait' if self.details['cardbrand'] == 'nvidia': os.system('cd /usr/share/envy/nvidia-graphics-drivers/ && sudo wget -c --tries=2 --timeout=20 --no-check-certificate' + self.details['website']) else: os.system('sudo wget -c --tries=2 --timeout=20 --no-check-certificate' + self.details['website']) if self.details['cardbrand'] == 'nvidia': md5new1 = main.getCommandOutput('md5sum /usr/share/envy/nvidia-graphics-drivers/' + self.details['drvname'] + ' | cut -d " " -f1') else: md5new1 = main.getCommandOutput('md5sum ' + '/usr/share/envy/' + self.details['drvname'] + ' | cut -d " " -f1') md5new = md5new1.strip() print 'md5new: ' + md5new print 'md5sumold: ' + self.details['md5old'] if md5new != self.details['md5old']: print 'ENVY ERROR: md5 Error! Operation aborted' sys.exit() def atipkgmake(self): if self.details['osname'] != 'dapper': os.system('sudo ln -sf /bin/bash /bin/sh') os.system('sh ' + self.details['drvname'] + ' --buildpkg Ubuntu/' + self.details['osname']) if self.details['osname'] != 'dapper': os.system('sudo ln -sf /bin/dash /bin/sh') def atipkginstall(self): drvname = self.details['drvname'] os.system('sudo dpkg -i *.deb') def atirmdeb(self): os.system('sudo rm /usr/src/fglrx-kernel*.deb') def atikmod(self): os.system('sudo module-assistant prepare') os.system('sudo module-assistant update') os.system('sudo module-assistant build fglrx') os.system('sudo module-assistant install fglrx') os.system('sudo depmod -a') def nvkernelcontrol(self): a = os.uname()[2] b = list(a) c1 = a[0:6] c = c1.strip() kernels1 = [ '2.6.13', '2.6.12', '2.6.11', '2.6.10'] kernels2 = [ '2.6.14', '2.6.15', '2.6.16', '2.6.17', '2.6.18', '2.6.19', '2.6.20'] systemname = self.details['osname'] if systemname == 'dapper': if c in kernels1: os.system('sudo ln -sf /usr/bin/gcc-3.4 /usr/bin/gcc') elif c in kernels2: os.system('sudo ln -sf /usr/bin/gcc-4.0 /usr/bin/gcc') if systemname == 'edgy': if c in kernels1: os.system('sudo ln -sf /usr/bin/gcc-3.4 /usr/bin/gcc') elif c in kernels2: os.system('sudo ln -sf /usr/bin/gcc-4.1 /usr/bin/gcc') d = '/usr/src/' + 'kernel-headers-' + a f = '/usr/lib/xorg/modules' g = '/usr/lib64/xorg/modules' if os.path.isdir(d): print 'Recompiled kernel detected' z = d + '/arch/i386/' if not os.path.isdir(z): os.system('sudo mkdir -p' + ' ' + z) if not os.path.isfile(z + 'Makefile.cpu'): if self.details['arch'] == 'x86_64': main.addmakefile64() else: main.addmakefile32() os.system('cd ' + d + ' && ' + 'sudo make prepare' + ' && ' + 'sudo make prepare scripts') if not os.path.isfile(z + 'Makefile.cpu'): print 'ENVY ERROR: Makefile.cpu not found!' sys.exit() if self.details['arch'] == 'x86_64': os.system('sudo sh ' + self.details['drvname'] + ' -n -s --x-prefix=' + g + ' --kernel-source-path=' + d) else: os.system('sudo sh ' + self.details['drvname'] + ' -n -s --x-prefix=' + f + ' --kernel-source-path=' + d) else: e = '/usr/src/' + 'linux-headers-' + a if self.details['arch'] == 'x86_64': os.system('sudo sh ' + self.details['drvname'] + ' -n -s --x-prefix=' + g + ' --kernel-source-path=' + e) else: os.system('sudo sh ' + self.details['drvname'] + ' -n -s --x-prefix=' + f + ' --kernel-source-path=' + e) os.system('sudo depmod -a') def newkernelcontrol(self): a = os.uname()[2] b = list(a) c1 = a[0:6] c = c1.strip() kernels1 = [ '2.6.13', '2.6.12', '2.6.11', '2.6.10'] kernels2 = [ '2.6.14', '2.6.15', '2.6.16', '2.6.17', '2.6.18', '2.6.19', '2.6.20'] systemname = self.details['osname'] if systemname == 'dapper': if c in kernels1: os.system('sudo ln -sf /usr/bin/gcc-3.4 /usr/bin/gcc') elif c in kernels2: os.system('sudo ln -sf /usr/bin/gcc-4.0 /usr/bin/gcc') if systemname == 'edgy': if c in kernels1: os.system('sudo ln -sf /usr/bin/gcc-3.4 /usr/bin/gcc') elif c in kernels2: os.system('sudo ln -sf /usr/bin/gcc-4.1 /usr/bin/gcc') d = '/usr/src/' + 'kernel-headers-' + a f = '/usr/lib/xorg/modules' g = '/usr/lib64/xorg/modules' if os.path.isdir(d): print 'Recompiled kernel detected' z = d + '/arch/i386/' if not os.path.isdir(z): os.system('sudo mkdir -p' + ' ' + z) if not os.path.isfile(z + 'Makefile.cpu'): if self.details['arch'] == 'x86_64': main.addmakefile64() else: main.addmakefile32() os.system('cd ' + d + ' && ' + 'sudo make prepare' + ' && ' + 'sudo make prepare scripts') if not os.path.isfile(z + 'Makefile.cpu'): print 'ENVY ERROR: Makefile.cpu not found!' sys.exit() def nvuninstalling(self): os.system('cd /usr/share/envy/nvidia-graphics-drivers/ && sudo sh ' + self.details['drvname'] + ' --uninstall') os.system('sudo aptitude reinstall linux-restricted-modules-`uname -r`') def xorgbackup(self): os.system('sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup_`date +%Y%m%d%H%M`') def restoregcc(self): a = os.uname()[2] b = list(a) c1 = a[0:6] c = c1.strip() kernels1 = [ '2.6.13', '2.6.12', '2.6.11', '2.6.10'] kernels2 = [ '2.6.14', '2.6.15', '2.6.16', '2.6.17', '2.6.18', '2.6.19'] systemname = self.details['osname'] if systemname == 'dapper': if c in kernels1: os.system('sudo ln -sf /usr/bin/gcc-3.4 /usr/bin/gcc') elif c in kernels2: os.system('sudo ln -sf /usr/bin/gcc-4.0 /usr/bin/gcc') if systemname == 'edgy': if c in kernels1: os.system('sudo ln -sf /usr/bin/gcc-3.4 /usr/bin/gcc') elif c in kernels2: os.system('sudo ln -sf /usr/bin/gcc-4.1 /usr/bin/gcc') def nvxorgset(self): distrolst = [ 'edgy', 'etch', 'feisty'] systemname = self.details['osname'] if systemname in distrolst: if self.details['drvtype'] == 'latest': os.system('sudo /usr/bin/nvidia-xconfig --composite') else: os.system('sudo /usr/share/envy/legacy/nvidia-xconfig --no-composite') else: os.system('sudo /usr/bin/nvidia-xconfig') def atixorgset(self): distrolst = [ 'edgy', 'etch', 'feisty'] systemname = self.details['osname'] objects.disablecomposite() os.system('sudo aticonfig --initial') os.system('sudo aticonfig --overlay-type=Xv') class Composite: def operate(self): lines = [] pat1 = re.compile('.*Section.*"Extensions".*\n') pat2 = re.compile('.*Option.*"Composite".*"(.+)".*\n') text = open(self.file, 'r') optext = text.readlines() for line in optext: m1 = pat1.match(line) m2 = pat2.match(line) if m1: line = '' lines.append(line) continue if m2: line = '>' lines.append(line) continue lines.append(line) text.close() sep = '' modtext = open(self.file, 'w') a = sep.join(lines) modtext.write(a) modtext.close() lastlines = [] lasttext = open(self.file, 'r') newtext = lasttext.readlines() pat3 = re.compile('>.*EndSection.*\n') for lastline in newtext: m3 = pat3.match(lastline) if m3: lastline = '' lastlines.append(lastline) continue lastlines.append(lastline) lasttext.close() modtext1 = open(self.file, 'w') b = sep.join(lastlines) modtext1.write(b) modtext1.close() class Compositechoice: def choosecomposite(self): objects.removecomposite() file = open(self.file, 'a') option = '\nSection "Extensions"\n\tOption "Composite" "' + self.operation + '"\nEndSection\n\n' file.write(option) file.close() class Chooselist: def init(self): self.driver = 'none' def blacklist(self): '''restore Ubuntu original linux-restricted-modules-common''' restrictedblk = open('/etc/default/linux-restricted-modules-common', 'w') restrictedblk.write('# This file is sourced from the linux-restricted-modules-common init\n # script and is used to disable the link-on-boot feature, one module\n # at a time. This can be useful if you want to use hand-compiled\n # versions of one or more modules, but keep linux-restricted-modules\n # installed on your system, or just to disable modules you don\'t use\n # and speed up your boot process by a second or two.\n #\n # Use a space-separated list of modules you wish to not have linked\n # on boot. The following example shows a (condensed) list of all\n # modules shipped in the linux-restricted-modules packages:\n #\n # DISABLED_MODULES="ath_hal fc fglrx ltm nv"\n #\n # Note that disabling "fc" disables all fcdsl drivers, "ltm" disables\n # ltmodem and ltserial, and "nv" disables both the nvidia drivers.\n # You can also name each module individually, if you prefer a subset.\n \n DISABLED_MODULES="' + self.driver + '"\n') restrictedblk.close()